<%--
    Document   : ConsultaProfissao
    Created on : May 29, 2011, 12:36:20 AM
    Author     : diogo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>




<script type="text/javascript">

	var cRelatorio = null;
	var CurrentOnloadFunction = window.onload;

	
	/**
	 * instancia o ajax pra area
	 */
	function createcRelatorio(){
		cRelatorio = new AjaxConnection("consultas/Relatorio.jsp");
		cRelatorio.setOutput(document.getElementById("output_relatorio"));
		cRelatorio.OnResponseReceive = function(){
			onChangeAreaCodArea()
		}
	}

	// verifica para criar funcao sem sobrescrever
	if (CurrentOnloadFunction != null ) {
		
		window.onload = function(){
			CurrentOnloadFunction();
			createcRelatorio();
		}
	}
	else {
		
		window.onload = function(){
			createcRelatorio();
		}
	}


	// botao consultar
	function consultarRelatorio(nome){
		cRelatorio.setParameter("nomerelatorio", nome);
		//cRelatorio.setParameter("relatorio", document.getElementById("relatorio_nome").value);
		//cArea.setParameter("DescricaoArea", document.getElementById("filtro_area").value);
		cRelatorio.startConnection();
	}
</script>


<!--
<div id="output_area">

</div>
-->